﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;

namespace JAAF.UI
{
    public class UIProcessCommand: ICommand
    {
        UIProcess m_oOwningProc;

        public UIProcessCommand(UIProcess _oOwningProcess)
        {
            m_oOwningProc = _oOwningProcess;
        }

        public bool CanExecute(object _oParameter)
        {
            return m_oOwningProc.CanExecuteCommand(this, _oParameter);
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object _oParameter)
        {
            m_oOwningProc.ExecuteCommand(this, _oParameter);
        }

        public string ID
        {
            get;

            set;
        }
    }
}
